<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相邻兄弟选择器之常用场景</title>
    <style>
        ul {
            width: 500px;
            margin: auto;
            list-style: none;
            padding: 0;
            border: 1px solid red;
            text-align: center;
        }
        /* + 后面的元素才会起作用 */
        li+li{border-top:1px solid red;}
    </style>
</head>

<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
</body>

</html>